/*
 * @Description: 接口管理-接口
 * @Author: xinqiao lxq1990.0716@qq.com
 * @Date: 2024-03-06
 * @LastEditors: xinqiao lxq1990.0716@qq.com
 * @LastEditTime: 2024-09-26
 */
import request from '/@/api/request'

/** 获取接口列表 */
export const requestInterfaceList = (data: InterfaceListTypes.IRequest) => {
  return request.post<IBaseResponse<InterfaceListTypes.IResponse[]>>('/system/ysys-user/interface/interfaceList/V1', data)
}

/** 添加接口 */
export const requestSaveInterface = (data: SaveInterfaceTypes.IRequest) => {
  return request.post<IBaseResponse<SaveInterfaceTypes.IResponse[]>>('/system/ysys-user/interface/saveInterface/V1', data)
}

/** 修改接口 */
export const requestUpdateInterface = (data: UpdateInterfaceTypes.IRequest) => {
  return request.post<IBaseResponse<UpdateInterfaceTypes.IResponse[]>>('/system/ysys-user/interface/updateInterface/V1', data)
}

/** 删除接口 */
export const requestDelInterface = (data: DelInterfaceTypes.IRequest) => {
  return request.post<IBaseResponse<DelInterfaceTypes.IResponse[]>>('/system/ysys-user/interface/delInterface/V1', data)
}

/** 根据接口id获取接口详情 */
export const requestGetInterfaceById = (data: GetInterfaceByIdTypes.IRequest) => {
  return request.post<IBaseResponse<GetInterfaceByIdTypes.IResponse[]>>('/system/ysys-user/interface/getInterfaceById/V1', data)
}
